﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.AdvTree;
using LibBot;

namespace NewerthBot
{
    public partial class Settings : Form
    {
        public Settings()
        {
            InitializeComponent();
        }

        private void Options_Load(object sender, EventArgs e)
        {
            foreach (IPlugin plugin in Program.Core.Plugins)
            {
                Node node = new Node();
                node.Text = plugin.Name;
                node.Tag = plugin;
                nodePlugins.Nodes.Add(node);
            }
        }

        private void advTree1_SelectionChanged(object sender, EventArgs e)
        {
            if (advTree1.SelectedNode.Tag.GetType().GetInterface("LibBot.IPlugin", true) != null)
            {
                IPlugin plugin = (IPlugin)advTree1.SelectedNode.Tag;
            }
        }
    }
}
